package com.ucode.crm.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ucode.crm.mode.CrmTeamUser;

public interface CrmTeamUserMapper {
    
    public int save(CrmTeamUser followupTeamUser);

    public int batchSave(List<CrmTeamUser> list);
    
    public int updatePower(@Param("id")Long id,@Param("power")Integer power);
    
    public int delete(Long id);
    
    public int batchDelete(List<Long> ids);
    
    public CrmTeamUser findById(Long id);
    
    public List<CrmTeamUser> findByIds(List<Long> ids);
    
    public CrmTeamUser find(@Param("targetId")Long targetId,@Param("targetType")Integer targetType,@Param("userId")Long userId);
    /**
     * 查询团队成员
     * @author liling
     * @date 2020年5月14日
     * @param targetId
     * @param targetType
     * @return
     */
    public List<CrmTeamUser> findList(@Param("targetId")Long targetId,@Param("targetType")Integer targetType);
    /**
     * 查询团队写作人(除负责人外)
     * @author liling
     * @date 2020年5月14日
     * @param targetId
     * @param targetType
     * @return
     */
    public List<Long> findCollaborator(@Param("targetId")Long targetId,@Param("targetType")Integer targetType);
    
}
